<!DOCTYPE html>
<html>
  <head>
    <title>贯通图</title>
    <script src="./d3.js"></script>
    <script src="./draw.js"></script>
  </head>

  <body>
    <div id="svg-meta"></div>

    <script>
      window["ShowThroughDrawing"] = function (d, a) {
        showGuan(d);
      };
      function showGuan(data) {
        let cc = JSON.parse(data);
        let config = {
          width: 1200, //容器宽
          height: 800, //容器高
          boxWidth: 100, //箱盒宽
          move: 60, //箱盒间距
          distance: 45, //端子间距，小于此值会遮挡
          background: "black", //背景色
          lineColor: "#ffffff", //线条色
          textColor: "red", //文字色
          circleColor: "blue", //端子色
        };
        new drawBoxLine(cc, "svg-meta", config); //前两个必传，config可以传null，上述给满配示例
      }
    </script>
  </body>
</html>
